<?php defined('SMIT_PATH') or die('Access Denied');
/**
 *	forum/app.php - SwixsBoard Forum Application
 *	This is Smit Matterhorn - Build 24109
 *	
 *
 * @author		The SmitBoard Team & Community
 * @license		GNU GPL v3
 * @link		http://smitboard.sf.net
 * @since		Matterhorn
 */
 
class Test extends SmitApp
{
	function main()
	{
		//$xss = '&lt;script&gt;alert(\'XSS\');&lt;/script&gt;';
		//echo $this->base->lib->xssfilter($xss);
		$rules = Array(
			'name' => array(
				'required' => true,
				'title' => 'Username',
				'maxlength' => 1,
				'type' => 'alpha',
				'callbacks' => array('trim', 'strtolower', 'xssclean')
			),
			/*
			'uname' => array(
				'required' => true,
				'title' => 'Username 2',
				'match' => 'name',
				'minlength' => 15,
				'maxlength' => 20,
				'type' => 'alpha'
			)
			*/
		);

		if(!$this->base->lib->validation($rules)):
print_r($this->base->lib->validation_errors);
?>
<form action="index.php/test/" method="post">
	<input type="text" name="name" value="<?=$this->base->lib->inputVal('name');?>" />
	<input type="text" name="uname" value="<?=$this->base->lib->inputVal('uname');?>" />
	<input type="submit" name="submit" value="POST" />
</form>
<?php
endif;
		
	}
}

?>